package cn.stylefeng.guns.modular.system.service.impl;

import cn.stylefeng.guns.modular.system.model.GameTagLog;
import cn.stylefeng.guns.modular.system.dao.GameTagLogMapper;
import cn.stylefeng.guns.modular.system.service.IGameTagLogService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liyong
 * @since 2019-11-28
 */
@Service
public class GameTagLogServiceImpl extends ServiceImpl<GameTagLogMapper, GameTagLog> implements IGameTagLogService {

    @Override
    public void saveGameTagLog(Integer roomId, Integer userId,
                               Integer tagetId,Integer tagId,Integer gameType) {
        GameTagLog gameTagLog=new GameTagLog();
        gameTagLog.setCreateTime(new Date());
        gameTagLog.setRoomId(roomId);
        gameTagLog.setTagId(tagId);
        gameTagLog.setUserId(userId);
        gameTagLog.setTargetId(tagetId);
        gameTagLog.setGameType(gameType);
        insert(gameTagLog);
    }
}
